package com.halflife.framework.generator.template.mapper;

/**
 * Created by zhaoyf on 2018/6/18.
 */
public class SelectByPrimaryKeyAnalysis extends BaseAnalysis {
    public SelectByPrimaryKeyAnalysis(Class clazz) {
        super(clazz);
    }

    @Override
    protected void setPrefix() {
        this.xmlStr.append("<select id=\"selectByPrimaryKey\" parameterType=\"java.lang.Integer\" resultMap=\"BaseResultMap\">\n");
        this.xmlStr.append("\t select \n");
        this.xmlStr.append("\t <include refid=\"Base_Column_List\" />\n");
        this.xmlStr.append("\t from " ).append(this.joinStrs.toString());
        this.xmlStr.append("\t where t.id = #{id,jdbcType=INTEGER}\n");

    }
    protected void comma() {

    }

    @Override
    protected String getValue1(CustomField customField) {

        return "";
    }



    ;

    protected void setSuffix() {

        this.xmlStr.append( " </select>");
    }

    ;
}
